package com.hqyj.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * <p>
 * 
 * </p>
 *
 * @author lsr
 * @since 2022-10-03
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ToString
public class Sale implements Serializable {

    private static final long serialVersionUID=1L;

    @TableId(value = "sale_id", type = IdType.AUTO)
    private Integer saleId;

    /**
     * 卖出的商品名称
     */
    private String saleGoodsName;

    /**
     * 卖出的商品数量
     */
    private Integer saleGoodsNums;

    /**
     * 商品单价
     */
    private Integer saleGoodsPrice;

    /**
     * 商品总价
     */
    private Integer saleGoodsPriceCount;

    /**
     * 卖出日期
     */
    //传到前端的
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    //前端传来的
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date saleGoodsTime;

    /**
     * 买家电话
     */
    private String saleBuyTel;

    /**
     * 买家邮箱
     */
    private String saleBuyEmail;

    @TableField(exist = false)
    private String userName;

    @TableField(exist = false)
    private Integer page;
    @TableField(exist = false)
    private Integer row;

    //开始时间


    @TableField(exist = false)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date startTime;
    //结束

    @TableField(exist = false)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date endTime;

    //各个商品销售总量
    @TableField(exist = false)
    private Integer saleNums;

    //各个商品销售总额
    @TableField(exist = false)
    private Integer salePriceCount;

}
